// src/router/index.js
import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  { path: '/', component: () => import('@/views/LoginManagement.vue') },
  {
    path: '/home_management',
    component: () => import('@/views/HomeManagement.vue'), // 使用布局组件
    redirect: '/home_page',
    children: [
      //{ path: '/', component: () => import('@/views/admin/HomePage.vue') },
      { path: '/user_management', component: () => import('@/views/admin/UserManagement.vue') },
      { path: '/volunteer_management', component: () => import('@/views/admin/VolunteerManagement.vue') },
      { path: '/activity_management', component: () => import('@/views/admin/ActivityManagement.vue') },
      { path: '/activity_signup_management', component: () => import('@/views/admin/ActivitySignupManagement.vue') },
      { path: '/home_page', component: () => import('@/views/admin/HomePage.vue') },
      { path: '/activity_checkin_management', component: () => import('@/views/admin/ActivityCheckinManagement.vue') },
      { path: '/activity_signup', component: () => import('@/views/admin/ActivitySgnup.vue') },
      { path: '/activity_checkin_vol', component: () => import('@/views/admin/ActivityCheckinVol.vue') },

      
      
      
    ]
  },

  //{ path: '/login_management', component: () => import('@/views/LoginManagement.vue') },
  // 登录/注册等不需要布局的路由
  { path: '/login_management', component: () => import('@/views/LoginManagement.vue') },
  { path: '/register_management', component: () => import('@/views/RegisterManagement.vue') },
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router